package com.sharp.authorization.dao.common.repository;

import com.sharp.authorization.dao.common.entity.SaSmsTemplate;
import com.sharp.authorization.dao.common.mapper.SaSmsTemplateDao;
import com.sharp.kernel.mybatis.repository.BaseMysqlRepository;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import javax.annotation.Resource;

/**
 * Title: SaSmsTemplateService
 * Description: Copyright: Copyright (c) 2019 Company: BHFAE
 *
 * @author Sharp
 * @date 2022/6/16 18:00
 */
@Service
public class SaSmsTemplateService extends BaseMysqlRepository<SaSmsTemplate, SaSmsTemplateDao> {

    @Resource
    private SaSmsTemplateDao saSmsTemplateDao;

    public SaSmsTemplate selectOneBySendSmsType(String sendSmsType) {
        Example example = getExample();
        Example.Criteria criteria = example.createCriteria();
        criteria.andEqualTo("sendSmsType", sendSmsType);
        return super.selectOne(example);
    }

}

